﻿using System;
using System.Collections.Generic;
using System.Text;
using SqlSugar;
using YL.Utils.Extensions;

namespace YL.Core.Entity
{
    [SugarTable("whr_course")]
    public class Whr_course
    {
        /// <summary>
        /// 课程id
        /// </summary>
        [SugarColumn(ColumnName = "id", IsPrimaryKey = true)]
        public int CourseId { get; set; }
        
        /// <summary>
        /// 课程名称
        /// </summary>
        [SugarColumn(ColumnName = "course_name")]
        public string CourseName { get; set; }

        /// <summary>
        /// 课程图片
        /// </summary>
        [SugarColumn(ColumnName = "logo")]
        public string Logo { get; set; }

        /// <summary>
        /// 课程信息简介
        /// </summary>
        [SugarColumn(ColumnName = "course_description")]
        public string CourseDescription { get; set; }
        
        /// <summary>
        /// 纬度
        /// </summary>
        [SugarColumn(ColumnName = "lat")]
        public decimal Lat { get; set; }

        /// <summary>
        /// 经度
        /// </summary>
        [SugarColumn(ColumnName = "lng")]
        public decimal Lng { get; set; }

        /// <summary>
        /// 地址详情
        /// </summary>
        [SugarColumn(ColumnName = "address")]
        public string Address { get; set; }
        
        /// <summary>
        /// 地址短名
        /// </summary>
        [SugarColumn(ColumnName = "address_name")]
        public string AddressName { get; set; }

        /// <summary>
        /// 地区ID
        /// </summary>
        [SugarColumn(ColumnName = "area_id")]
        public int AreaId { get; set; }

        /// <summary>
        /// 围观人数
        /// </summary>
        [SugarColumn(ColumnName = "view_numbers")]
        public int ViewNumbers { get; set; }

        /// <summary>
        /// 创建时间
        /// </summary>
        [SugarColumn(ColumnName = "create_at")]
        public int CreateAt { get; set; } = DateTimeExt.GetUnixTimestamp();

        /// <summary>
        /// 更新时间
        /// </summary>
        [SugarColumn(ColumnName = "update_at")]
        public int UpdateAt { get; set; }

        
        /// <summary>
        /// 是否推荐
        /// </summary>
        [SugarColumn(ColumnName = "is_recommend")]
        public byte IsRecommend { get; set; }

        /// <summary>
        /// 状态
        /// </summary>
        [SugarColumn(ColumnName = "status")]
        public byte Status { get; set; }

        /// <summary>
        /// 报名截止时间
        /// </summary>
        [SugarColumn(ColumnName = "registration_deadline")]
        public int RegistrationDeadline { get; set; }

        [SugarColumn(ColumnName = "course_content_id")]
        public int? CourseContentId { get; set; }

        /// <summary>
        /// 课程需要的集赞数
        /// </summary>
        [SugarColumn(ColumnName = "support_times")]
        public int SupportTimes { get; set; }

        /// <summary>
        /// 课程需要的集赞数
        /// </summary>
        [SugarColumn(ColumnName = "expire")]
        public int Expire { get; set; }

        /// <summary>
        /// 最大可报名人数
        /// </summary>
        [SugarColumn(ColumnName = "support_number")]
        public int SupportNumber { get; set; }

        /// <summary>
        /// 已报名人数
        /// </summary>
        [SugarColumn(ColumnName = "left_number")]
        public int LeftNumber { get; set; }

        /// <summary>
        /// minio图片uuid
        /// </summary>
        [SugarColumn(ColumnName = "object_id")]
        public string ObjectId { get; set; }

        [SugarColumn(ColumnName = "start_time")]
        public DateTime StartTime { get; set; }

        [SugarColumn(ColumnName = "lesson_time")]
        public string LessonTime { get; set; }

        [SugarColumn(ColumnName = "course_duration")]
        public int CourseDuration { get; set; }

        [SugarColumn(ColumnName = "background")]
        public string Background { get; set; }

        /// <summary>
        /// 联系方式
        /// </summary>
        [SugarColumn(ColumnName = "contact_number")]
        public string ContactNumber { get; set; }

        /// <summary>
        /// 报名截止日期
        /// </summary>
        [SugarColumn(ColumnName = "deal_line")]
        public DateTime DealLine { get; set; }
    }
}
